-
Notifications
You must be signed in to change notification settings - Fork 25
[ENG-6719] Show Funder and Grant ID information on registries moderation cards #855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/pbs-25-24
Are you sure you want to change the base?
[ENG-6719] Show Funder and Grant ID information on registries moderation cards #855
Conversation
| catchError((error) => { | ||
| return handleSectionError(ctx, 'submissions', error); | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| catchError((error) => { | |
| return handleSectionError(ctx, 'submissions', error); | |
| }) | |
| catchError((error) => handleSectionError(ctx, 'submissions', error)) |
|
|
||
| return this.metadataService.getCustomItemMetadata(registryId).pipe( | ||
| tap((res) => { | ||
| const newFunders = res.funders; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove it
| patch({ | ||
| funders: newFunders, | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| patch({ | |
| funders: newFunders, | |
| }) | |
| patch({ funders: res.funders }) |
| handleOpen() { | ||
| this.loadContributors.emit(); | ||
| this.loadRegistrySubmissionFunders.emit(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to have one emit: this.loadAdditionalData.emit().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add tests for inputs.
|
|
||
| beforeEach(async () => { | ||
| await TestBed.configureTestingModule({ | ||
| imports: [FunderAwardsListComponent, TranslateModule.forRoot()], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove TranslateModule.forRoot(). It is legacy code for modules. We are using standalone components. Use OSFTestingModule.
| const MOCK_FUNDERS: Funder[] = [ | ||
| { | ||
| funderName: 'National Science Foundation', | ||
| awardNumber: 'NSF-2024-X', | ||
| funderIdentifier: '10.13039/100000001', | ||
| funderIdentifierType: 'Crossref Funder ID', | ||
| awardUri: 'https://nsf.gov/award/1', | ||
| awardTitle: 'Advanced Research Initiative', | ||
| }, | ||
| { | ||
| funderName: 'European Research Council', | ||
| awardNumber: 'ERC-888', | ||
| funderIdentifier: '10.13039/501100000781', | ||
| funderIdentifierType: 'Crossref Funder ID', | ||
| awardUri: 'https://erc.europa.eu/award/2', | ||
| awardTitle: 'Future Fellowship', | ||
| }, | ||
| ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have mocks for it in testing. Use MOCK_FUNDERS import.
import { MOCK_FUNDERS } from '@testing/mocks/funder.mock';
Purpose
Some registries members use funder information to determine priority or relevance of submissions. They currently must drill down several layers within their moderation workflow to find this information.
Summary of Changes
Screenshot(s)
5ed4-290b-4e53-98a8-2db063551b9c.mp4
Side Effects
QA Notes